home *** CD-ROM | disk | FTP | other *** search
/ CD Classic / CD CLASSIC #1.iso / winfract / fractint.l < prev    next >
Text File  |  1990-12-08  |  6KB  |  445 lines

  1. comment {
  2.  
  3. The following fractals, were written by Adrian Mariano based on The Fractal 
  4. Geometry of Nature by Mandlebrot. 
  5.  
  6. }
  7.  
  8.  
  9. Koch1 {
  10.   Angle 6
  11.   Axiom F--F--F
  12.   F=F+F--F+F
  13. }
  14.  
  15. Koch2 {
  16.   Angle 12
  17.   Axiom F---F---F---F
  18.   F=-F+++F---F+
  19. }
  20.  
  21. Koch3 {
  22.   Angle 4
  23.   Axiom F-F-F-F
  24.   F=F-F+F+FF-F-F+F
  25. }
  26.  
  27. Dragon {
  28.   Angle 8
  29.   Axiom FX
  30.   F=
  31.   y=+FX--FY+
  32.   x=-FX++FY-
  33. }
  34.  
  35. Peano1 {
  36.   Angle 4
  37.   Axiom F-F-F-F
  38.   F=F-F+F+F+F-F-F-F+F
  39. }
  40.  
  41. Cesaro {
  42.   Angle 34
  43.   Axiom FX
  44.   F=
  45.   X=----F!X!++++++++F!X!----
  46. }
  47.  
  48.  
  49. DoubleCesaro {
  50.   Angle 4
  51.   axiom D\90D\90D\90D\90
  52.   D=\42!D!/84!D!\42
  53. }
  54.  
  55. FlowSnake {
  56.   angle=6;
  57.   axiom FL
  58.   L=FL-FR--FR+FL++FLFL+FR-",
  59.   R=+FL-FRFR--FR-FL++FL+FR",
  60.   F=
  61. }
  62.  
  63. CantorDust {
  64.   Angle 6
  65.   Axiom F
  66.   F=FGF
  67.   G=GGG
  68. }
  69.  
  70. Snowflake2 {
  71.   angle 12
  72.   axiom F
  73.   F=++!F!F--F--F@IQ3|+F!F--
  74.   F=F--F!+++@Q3F@QI3|+F!F@Q3|+F!F
  75. }
  76.  
  77. SnowflakeColor {
  78.   angle 12
  79.   axiom F
  80.   F=--!F<1!F<1++F<1++F<1@IQ3|-F<1!F<1++
  81.   F=F<1++F<1!---@Q3F<1@QI3|-F<1!F<1@Q3|-F<1!F<1
  82.   <=
  83. }
  84.  
  85. Island1 {
  86.   angle 4 
  87.   axiom F+F+F+F
  88.   F=FFFF-F+F+F-F[-GFF+F+FF+F]FF
  89.   G=@8G@I8
  90. }
  91.  
  92.  
  93. Island2 {
  94.   angle 4
  95.   axiom f+f+f+f
  96.   f=f+gf-ff-f-ff+g+ff-gf+ff+f+ff-g-fff
  97.   g=@6G@I6
  98. }      
  99.  
  100.  
  101. Quartet { 
  102.     angle 4
  103.     axiom fb
  104.     A=FBFA+HFA+FB-FA
  105.     B=FB+FA-FB-JFBFA
  106.     F=
  107.     H=-
  108.     J=+
  109. }
  110.  
  111.  
  112. SnowFlake1 {
  113.   Angle 12
  114.   Axiom FR
  115.   R=++!FRFU++FU++FU!---@Q3FU|-@IQ3!FRFU!
  116.   U=!FRFU!|+@Q3FR@IQ3+++!FR--FR--FRFU!--
  117.   F=
  118. }
  119.  
  120.  
  121. SnowFlake3 {
  122.   angle 12
  123.   axiom fx
  124.   x=++f!x!fy--fx--fy|+@iq3fyf!x!++f!y!++f!y!fx@q3+++f!y!fx
  125.   y=fyf!x!+++@iq3fyf!x!++f!x!++f!y!fx@q3|+fx--fy--fxf!y!++
  126.   f=
  127. }
  128.  
  129.  
  130. Tree1 {
  131.   angle=12;
  132.   axiom +++FX
  133.   X=@.6[-FX]+FX
  134. }
  135.  
  136.  
  137. Peano2 {
  138.   Angle 8
  139.   Axiom FXY++F++FXY++F
  140.   X=XY@Q2-F@IQ2-FXY++F++FXY
  141.   Y=-@Q2F-@IQ2FXY
  142. }
  143.  
  144.  
  145. Sierpinski1 {
  146. angle 3
  147. axiom F
  148. F=FXF
  149. X=+FXF-FXF-FXF+
  150. }
  151.  
  152.  
  153.  
  154. Koch4 {
  155. angle 12
  156. axiom f++++f++++f
  157. f=+f--f++f-
  158. }
  159.  
  160.  
  161. comment {
  162.  
  163. These come from The Science of Fractal Images.  I got them 
  164. from Ken Philip.
  165.  
  166.                -- Adrian
  167. }
  168.  
  169.  
  170. Plant7 {
  171. ;; !Bush p. 285b TSOFI
  172. axiom Z
  173. z=zFX[+Z][-Z]
  174. x=x[-FFF][+FFF]FX
  175. angle 14
  176. }
  177.  
  178. Plant8 {
  179. ;;  !Bush p, 286 TSOFI!
  180. axiom SLFFF
  181. s=[+++Z][---Z]TS
  182. z=+H[-Z]L
  183. h=-Z[+H]L
  184. t=TL
  185. l=[-FFF][+FFF]F
  186. angle 20
  187. }
  188.  
  189. Hilbert {
  190. axiom x
  191. x=-YF+XFX+FY-
  192. y=+XF-YFY-FX+
  193. angle 4
  194. }
  195.  
  196. Sierpinski3 {
  197. ;; This parameter list is from Jim Hanan via Corbit
  198. axiom F-F-F
  199. f=F[-F]F
  200. angle 3
  201. }
  202.  
  203. Peano3 {
  204. axiom x
  205. x=XFYFX+F+YFXFY-F-XFYFX
  206. y=YFXFY-F-XFYFX+F+YFXFY
  207. angle 4
  208. }
  209.  
  210. Koch5 {
  211. axiom f+F+F+F
  212. f=F+F-F-FFF+F+F-F
  213. angle 4
  214. }
  215.  
  216.  
  217. Sierpinski2 {
  218. ;; !This parameter list is from the 3rd printing of TSOFI
  219. axiom FXF--FF--FF
  220. f=FF
  221. x=--FXF++FXF++FXF--
  222. angle 6
  223. }
  224.  
  225.  
  226. SierpinskiSquare {
  227. axiom F+F+F+F
  228. f=FF+F+F+F+FF
  229. angle 4
  230. }
  231.  
  232. comment {
  233.  
  234.     Created by Adrian Mariano
  235.  
  236.     }
  237.  
  238.  
  239. Pentagram {
  240.   angle 10
  241.   axiom fx++fx++fx++fx++fx
  242. ;;  f=f[++++@1.618033989f]
  243.   x=[++++@i1.618033989f@.618033989f!x!@i.618033989f]
  244. }
  245.  
  246. comment {
  247.  
  248.     The following from the Algorithmic Beauty of Plants.
  249.  
  250.     -- Adrian
  251. }
  252.  
  253.  
  254.  QuadKoch {
  255. ;;    Quadratic Koch island
  256. ;;    Figure 1.7a pg. 9
  257. angle 4
  258. AXIOM F-F-F-F-
  259. F=F+FF-FF-F-F+F+FF-F-F+F+FF+FF-F
  260. }
  261.  
  262. Fass1 {
  263. ;;   FASS curve (3x3 tiles form macrotile)
  264. ;;   Figure 1.16a pg. 17
  265. axiom -l
  266. angle 4
  267. L=LF+RFR+FL-F-LFLFL-FRFR+
  268. R=-LFLF+RFRFR+F+RF-LFL-FR
  269. }
  270.  
  271. Fass2 {
  272. ;;   FASS curve (4x4 tiles form macrotile)
  273. ;;   Figure 1.16b pg. 17
  274. angle 4
  275. axiom -l
  276. L=LFLF+RFR+FLFL-FRF-LFL-FR+F+RF-LFL-FRFRFR+
  277. R=-LFLFLF+RFR+FL-F-LF+RFR+FLF+RFRF-LFL-FRFR
  278. }
  279.  
  280. QuadGosper {
  281. ;;   Quadratic Gosper curve
  282. ;;   Figure 1.11b pg. 12
  283. angle 4
  284. axiom -Fr
  285. l=FlFl-Fr-Fr+Fl+Fl-Fr-FrFl+Fr+FlFlFr-Fl+Fr+FlFl+Fr-FlFr-Fr-Fl+Fl+FrFr-
  286. r=+FlFl-Fr-Fr+Fl+FlFr+Fl-FrFr-Fl-Fr+FlFrFr-Fl-FrFl+Fl+Fr-Fr-Fl+Fl+FrFr
  287. f=
  288. }
  289.  
  290.  
  291. Plant1 {
  292. ;;   Plant-like structure, figure 1.24a pg. 25
  293. ;;   also p. 285a TSOFI
  294. angle 14
  295. axiom f
  296. f=F[+F]F[-F]F
  297. }
  298.  
  299.  
  300. Plant2 {
  301. ;;   Plant-like structure, figure 1.24b pg. 25
  302. angle 18
  303. axiom f
  304. f=F[+F]F[-F][F]
  305. }
  306.  
  307. Plant3 {
  308. ;;   Plant-like structure, figure 1.24c pg. 25
  309. angle 16
  310. axiom f
  311. f=FF-[-F+F+F]+[+F-F-F]
  312. }
  313.  
  314. Plant4 {
  315. ;;   Plant-like structure, figure 1.24d pg. 25
  316. angle 18
  317. axiom x
  318. X=F[+X]F[-X]+X
  319. F=FF
  320. }
  321.  
  322. Plant5 {
  323. ;;   Plant-like structure, figure 1.24e pg. 25
  324. angle 14
  325. axiom x
  326. X=f[+X][-X]FX
  327. F=FF
  328. }
  329.  
  330. plant6 {
  331. ;;   Plant-like structure, figure 1.24f pg. 25
  332. angle 16
  333. axiom x
  334. X=F-[[X]+X]+F[+FX]-X
  335. F=FF
  336. }
  337.  
  338.  
  339. Curve1 {
  340. ;;   curve from figure 1.9a pg. 10 ABoP
  341. angle 4
  342. axiom F-F-F-F-
  343. f=FF-F-F-F-F-F+F
  344. }
  345.  
  346.  
  347. Curve2 {
  348. angle 4
  349. axiom F-F-F-F-
  350. f=FF-F+F-F-FF
  351. }
  352.  
  353.  
  354. Curve3 {
  355. ;;   curve from figure 1.9e pg. 10 ABoP
  356. axiom F-F-F-F-
  357. angle 4
  358. F=F-FF--F-F
  359. }
  360.  
  361.  
  362.  
  363. Leaf1 {
  364.  
  365. angle 8
  366. axiom x
  367. ;;   Compound leaf with alternating branches.
  368. ;;   Figure 5.12b pg. 130
  369.  
  370. a=n
  371. n=o
  372. o=p
  373. p=x
  374. b=e
  375. e=h
  376. h=j
  377. j=y
  378. x=F[+A(4)]Fy
  379. y=F[-B(4)]Fx
  380. F=@1.18F@i1.18
  381. }
  382.  
  383.  
  384. Leaf2 {
  385. ;;   Compound leaf with alternating branches.
  386. ;;   Figure 5.12a pg. 130
  387. angle 8
  388. axiom a
  389. a=f[+x]fb
  390. b=f[-y]fa
  391. x=a
  392. y=b
  393. f=@1.36f@i1.36
  394. }
  395.  
  396.  
  397. Bush {
  398.         Angle 16
  399.         Axiom ++++F
  400.         F=FF-[-F+F+F]+[+F-F-F]
  401. }
  402.  
  403. MyTree {
  404.         Angle 16
  405.         Axiom ++++F
  406.         F=FF-[XY]+[XY]
  407.         X=+FY
  408.         Y=-FX
  409. }
  410.  
  411. ColorTriangleGasket {
  412.         Angle 6
  413.         Axiom --X
  414.         X=++FXF++FXF++FXF>1
  415.         F=FF
  416. }
  417.  
  418. SquareGasket {
  419.         Angle 4
  420.         Axiom X
  421.         X=+FXF+FXF+FXF+FXF
  422.         F=FF
  423. }
  424.  
  425. DragonCurve {
  426.         Angle 4
  427.         Axiom X
  428.         X=X-YF-
  429.         Y=+FX+Y
  430. }
  431.  
  432. Square {
  433.         Angle 4
  434.         Axiom F+F+F+F
  435.         F=FF+F+F+F+FF
  436. }
  437.  
  438.  
  439. KochCurve {
  440.         Angle 6
  441.         Axiom F
  442.         F=F+F--F+F
  443. }
  444.  
  445.